package vklib.emulator
{
    import flash.display.*;

    public class VkApplication extends Object
    {
        private var _stage:Stage;
        private static var _instance:VkApplication;
        private static var _allowInst:Boolean;

        public function VkApplication(param1:Stage)
        {
            if (!_allowInst)
            {
                throw new Error("Error: Instantiation failed.");
            }
            this._stage = param1;
            return;
        }// end function

        public function set frameRate(param1:Number) : void
        {
            this._stage.frameRate = param1;
            return;
        }// end function

        public function get stageHeight() : Number
        {
            return Math.round(this._stage.stageHeight / this.parameters.stageScale);
        }// end function

        public function get stageWidth() : Number
        {
            return Math.round(this._stage.stageWidth / this.parameters.stageScale);
        }// end function

        public function set align(param1:String) : void
        {
            this._stage.align = param1;
            return;
        }// end function

        public function get align() : String
        {
            return this._stage.align;
        }// end function

        public function get scaleMode() : String
        {
            return this._stage.scaleMode;
        }// end function

        public function get parameters() : Object
        {
            return VkConfig.getConfig();
        }// end function

        public function get frameRate() : Number
        {
            return this._stage.frameRate;
        }// end function

        public function set scaleMode(param1:String) : void
        {
            this._stage.scaleMode = param1;
            return;
        }// end function

        public function set quality(param1:String) : void
        {
            this._stage.quality = param1;
            return;
        }// end function

        public function get quality() : String
        {
            return this._stage.quality;
        }// end function

        public static function getInstance(param1:Stage) : VkApplication
        {
            if (_instance == null)
            {
                _allowInst = true;
                _instance = new VkApplication(param1);
                _allowInst = false;
            }
            return _instance;
        }// end function

    }
}
